package com.richinfo.buddy.common.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

public class SpringContextUtils {

    public static ConfigurableApplicationContext getApplicationContext() {
        return BuddySpringApplicationRunListener.getApplicationContext();
    }

    public static Environment getEnvironment() {
        return getApplicationContext().getEnvironment();
    }
}
